package com.qilin.hscs.util;


import com.alibaba.fastjson.JSON;
import com.qilin.hscs.enums.ResultEnum;
import com.qilin.hscs.vo.ResultVO;

public class ResultVOUntil {

    public static ResultVO success(Object data){
        ResultVO resultVO=new ResultVO();
        resultVO.setCode(ResultEnum.SUCCESS.getCode());
        resultVO.setMsg("");
        resultVO.setData(data);
        return resultVO;
    }

    public static ResultVO success(){
        return success(null);
    }

    public static ResultVO error(int code,String msg){
        ResultVO resultVO=new ResultVO();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }
}
